package com.wanghengzhi.kata;

/**
 *
 * @author wanghengzhi
 * @since 2021/11/15 20:05
 */
public class AgedBrie extends Goods {
    public AgedBrie(int quality, int sellIn) {
        super("Aged Brie", quality, sellIn);
    }

    @Override
    public void updateByDay() {
        increaseByOneIfQualityLessThanMaxValue();
        decreaseSellInByOne();
        if (isExpired()) {
            increaseByOneIfQualityLessThanMaxValue();
        }
    }
}
